import request from '@/utils/request'

// 获取账单明细
export async function getBillList(params: any) {
  return request('/api/v2/getBillList', {
    method: 'GET',
    params
  })
}

// 开户上报
export async function accountOpeningCredit(data: any) {
  return request('/api/credit/accountOpeningCredit', {
    method: 'POST',
    data
  })
}

// 追加还款流水
export async function appendRepaymentTurnover(data: any) {
  return request('/api/credit/appendRepaymentTurnover', {
    method: 'POST',
    data
  })
}

// 催收上报
export async function collectionReportCredit(data: any) {
  return request('/api/credit/collectionReportCredit', {
    method: 'POST',
    data
  })
}

// 获取催收上报逾期天数
export async function getRepaymentStatusMap(params: any) {
  return request('/api/credit/getRepaymentStatusMap', {
    method: 'GET',
    params
  })
}

// 账户结清
export async function accountClose(data: any) {
  return request('/api/credit/accountClose', {
    method: 'POST',
    data
  })
}

// 取消上报
export async function cancelReportCredit(data: any) {
  return request('/api/credit/cancelReportCredit', {
    method: 'POST',
    data
  })
}

// 上报材料生成
export async function generateFileData(params: any) {
  return request('/api/credit/generateFileData', {
    method: 'GET',
    params
  })
}

// 提交上报材料
export async function submitUploadFile(params: any) {
  return request('/api/credit/submitUploadFile', {
    method: 'GET',
    params
  })
}

// 征信前置校验
export async function getCreditQueryTime(params: any) {
  return request('/api/v2/getCreditQueryTime', {
    method: 'GET',
    params
  })
}

// 确认支付
export async function billPayment(data: any) {
  return request('/api/v2/BillPayment', {
    method: 'POST',
    data
  })
}

// 征信权限查询
export async function userCreditQuery(params: any) {
  return request('/api/v2/userCreditQuery', {
    method: 'GET',
    params
  })
}

// 公证- 获取token
export async function getApiToken(params: any) {
  return request('/api/notarization/getApiToken', {
    method: 'GET',
    params
  })
}

// 公证- 上传订单基本信息
export async function pushCustomerInfo(data: any) {
  return request('/api/notarization/pushCustomerInfo', {
    method: 'POST',
    data
  })
}

// 公证- 上传用户身份证信息
export async function pushIdCardInfo(data: any) {
  return request('/api/notarization/pushIdCardInfo', {
    method: 'POST',
    data
  })
}

// 公证- 申请公证
export async function readyNotary(data: any) {
  return request('/api/notarization/readyNotary', {
    method: 'POST',
    data
  })
}

// 公证- 上传合同信息
export async function pushContractInfo(data: any) {
  return request('/api/notarization/pushContractInfo', {
    method: 'POST',
    data
  })
}

// 公证- 查询公证结果
export async function queryNotary(data: any) {
  return request('/api/notarization/queryNotary', {
    method: 'POST',
    data
  })
}

// 公证- 取消公证
export async function cancelNotary(data: any) {
  return request('/api/notarization/cancelNotary', {
    method: 'POST',
    data
  })
}

// 公证- 获取更新公证链接
export async function getNotaryLink(data: any) {
  return request('/api/notarization/getNotaryLink', {
    method: 'POST',
    data
  })
}

// 获取公证权限
export async function isOpenNotary(params: any) {
  return request('/api/notarization/isOpenNotary', {
    method: 'GET',
    params
  })
}

// 获取已出证数量
export async function queryNotaryCount(data: any) {
  return request('/api/notarization/queryNotaryCount', {
    method: 'POST',
    data
  })
}

// 获取账单详情
export async function getBillDetail(params: any) {
  return request('/api/v2/getBillDetail', {
    method: 'GET',
    params
  })
}
